#include <string>
#include <iostream>
#include "TestObjInfo.h"


void getTestObjInfo(TestObjInfo_t &obj)
{
    std::cout << "Input Name: ";
    std::cin >> obj.name;
    std::cout << "Input ID: ";
    std::cin >> obj.test_id;

    std::cout << obj.name;
    std::cout << "[" << obj.test_id << "]" << std::endl;
    std::cout << "Enter to start test..." << std::endl;
    getchar();
    while (getchar() != '\n');
}

void showTestResult(const TestObjInfo_t &obj)
{
    std::cout << "****************************" << std::endl;
    std::cout << "Name: " << obj.name << std::endl;
    std::cout << "ID: " << obj.test_id << std::endl;
    std::cout << "score: " << obj.typeTestResult.totalScore << std::endl;
    std::cout << "accuracy rate: " << obj.typeTestResult.accuracyRate << std::endl;
    std::cout << "Time: " << obj.typeTestResult.costTime << "s" << std::endl;
}